#!/bin/bash

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH


#创建测试软连接
link(){
	sudo /etc/init.d/bt restart
	sudo rm -rf /www/server/panel/plugin/linksforbt
	sudo ln -s ${PWD}/code /www/server/panel/plugin/linksforbt
	
}
unlink(){
	sudo /etc/init.d/bt restart
	sudo rm -rf /www/server/panel/plugin/linksforbt
	sudo rm -rf ${PWD}/code/*.pyc
	sudo rm -rf ${PWD}/code/log/*
	sudo rm -rf ${PWD}/*.out
	
}
if [ "${1}" == 'link' ];then
	link
elif [ "${1}" == 'unlink' ];then
	unlink
else
	echo 'Error!';
fi
